﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;

namespace Ecommerce.Repository
{
    public interface IRepository<T> where T : class,new()
    {
        Task<int> AddAsync(T entity);

        Task<int> Update(T entity);

        Task<List<T>> GetAllAsync();

        Task<T> GetModelAsync(int id);

        Task<List<T>> GetAsync(Expression<Func<T, bool>> expre);

    }
}
